package com.ly.erms.common.constant.state;
/**
 * 管理员状态
 * @author liuyang
 * @date 2017年12月29日
 */
public enum ManagerStatus {

	OK(1,"启用"),FREEZED(2,"冻结"),DELETED(3,"被删除");
	
	int code;
	String message;
	private ManagerStatus(int code,String message) {
		this.code = code;
		this.message = message;
	}
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public static String valueOf(Integer code){
		if(code == null){
			return "";
		}else{
			for(ManagerStatus managerStatus:ManagerStatus.values()){
				if(managerStatus.getCode() == code){
					return managerStatus.getMessage();
				}
			}
			return "";
		}
	}
}
